package com.onehouse.infrastructure.dao;

import com.onehouse.infrastructure.dao.po.RoomPrice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface RoomPriceDao {
    int insert(RoomPrice roomPrice);
    int insertByDateRange(List<RoomPrice> roomPrices);
    List<RoomPrice> selectByRoomTypeId(Long roomId);
    RoomPrice selectByTypeAndDate(RoomPrice roomPrice);
    List<RoomPrice> selectList(@Param("startTime") LocalDate startTime, @Param("endTime") LocalDate endTime);
    int updateByDate(RoomPrice roomPrice);
    int updateByDateRange(RoomPrice roomPrice, LocalDate startTime, LocalDate endTime);
    int deleteById(Long priceId);
}